package com.atguigu.gulimail.service;

import com.atguigu.gulimail.vo.Cart;
import com.atguigu.gulimail.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {

    CartItem addToCart(Long skuId, Integer skuNum) throws ExecutionException, InterruptedException;

    CartItem addToCartSuccess(Long skuId);

    /**
     * 进入到购物车页面
     * @return
     */
    Cart cartListPage() throws ExecutionException, InterruptedException;

    /**
     * 清空购物车
     */
    void clearCart(String cartKeys);

    /**
     * 修改商品状态
     * @param skuId
     * @param check
     */
    void checkItem(String skuId, Integer check);

    void changeNum(String skuId, Integer num);

    void deleteItem(String skuId);

    List<CartItem> getCartItem();

}
